home *** CD-ROM | disk | FTP | other *** search
- Path: cea.fr!usenet
- From: Buteau <buteau@bali.saclay.cea.fr>
- Newsgroups: comp.lang.c++
- Subject: How to know the exact status of fstreams
- Date: 5 Mar 1996 11:56:58 GMT
- Organization: CEA CEN (Commissarait a l'energie atomique)
- Message-ID: <4hha6a$2vg@news.cea.fr>
- NNTP-Posting-Host: bali.saclay.cea.fr
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; SunOS 5.5 sun4m)
- X-URL: news:comp.lang.c++
-
- When I open a file with something like :
-
- ofstream oss(myfile.txt);
-
-
- If this open fails (which I generally test with a
-
- if (!oss)
- { blah blah ......
-
- I would like to know the exact reason of the open failure
- (disk full, unautorizhed access to the file, ....)
-
- Can I do it with the fstream status ?
- And if not are there some "standard" or idiomatic solution
-
-